#ifndef FILETRANSFAREEVENT_H_
#define FILETRANSFAREEVENT_H_

#include <wx/event.h>
#include "../Buddy.h"
#include "../Actions.h"

namespace Impp
{

class FileTransfareEvent : public wxNotifyEvent
{
private:
	ActionId actionId;
	Buddy* sender;
	wxString fileName;
	size_t fileCount;
	size_t totalSize;


public:
	FileTransfareEvent(const ActionId & actionId, Buddy* sender, const wxString & fileName, size_t fileCount, size_t totalSize, wxEventType eventType = wxEVT_NULL, int id = 0);
	virtual ~FileTransfareEvent();

	virtual wxEvent* Clone()const;

	Buddy* getSender();
	ActionId getActionId();
	wxString getInfoString();
};

// ein Typedef auf die entsprechenden EventHandler
typedef void(wxEvtHandler::*FileTransfareEventFunction)(FileTransfareEvent&);

// wxWidgets den neuen Event mitteilen
BEGIN_DECLARE_EVENT_TYPES()
  DECLARE_EVENT_TYPE(EVT_FILE_TRANSFARE, -1)
END_DECLARE_EVENT_TYPES()

// dieses #define sorgt daf�r das man den Event �ber den Makro EventTable einbinden kann
#define EVT_FILE_TRANSFARE_MACRO(id, fn) DECLARE_EVENT_TABLE_ENTRY(               \
		EVT_FILE_TRANSFARE, id, -1, (wxObjectEventFunction)               \
        (wxEventFunction)(FileTransfareEventFunction) & fn,                             \
        (wxObject*) NULL),

// dieses #define sorgt daf�r das man den Event auch �ber Connect verbinden kann
#define FileTransfareEventHandler(func)                                                 \
        (wxObjectEventFunction)                                                \
        (wxEventFunction)wxStaticCastEvent(FileTransfareEventFunction, &func)



}

#endif /*FILETRANSFAREEVENT_H_*/
